using MediatR;
using S.M.SmartMedical.ErrorCode;
using S.M.SmartMedical.Domain.Enums;

namespace S.M.SmartMedical.API.Read.Application.Query;

/// <summary>
/// 获取医疗项目查询
/// </summary>
public class GetMedicalProjectsQuery : IRequest<APIResult<List<MedicalProjectDto>>>
{
    /// <summary>
    /// 院区ID
    /// </summary>
    public int HospitalAreaId { get; set; }
    
    /// <summary>
    /// 项目类别（可选）
    /// </summary>
    public ProjectCategory? Category { get; set; }
    
    /// <summary>
    /// 搜索关键词（可选）
    /// </summary>
    public string? SearchKeyword { get; set; }
    
    /// <summary>
    /// 是否只返回启用的项目
    /// </summary>
    public bool OnlyEnabled { get; set; } = true;
}

/// <summary>
/// 医疗项目数据传输对象
/// </summary>
public class MedicalProjectDto
{
    /// <summary>
    /// 项目ID
    /// </summary>
    public int Id { get; set; }
    
    /// <summary>
    /// 项目名称
    /// </summary>
    public string Name { get; set; } = string.Empty;
    
    /// <summary>
    /// 项目描述
    /// </summary>
    public string? Description { get; set; }
    
    /// <summary>
    /// 项目价格
    /// </summary>
    public decimal Price { get; set; }
    
    /// <summary>
    /// 项目类别
    /// </summary>
    public ProjectCategory Category { get; set; }
    
    /// <summary>
    /// 项目编码
    /// </summary>
    public string Code { get; set; } = string.Empty;
    
    /// <summary>
    /// 项目标签
    /// </summary>
    public string? Tags { get; set; }
    
    /// <summary>
    /// 预计时长（分钟）
    /// </summary>
    public int? EstimatedDuration { get; set; }
    
    /// <summary>
    /// 检查前准备说明
    /// </summary>
    public string? PreparationInstructions { get; set; }
    
    /// <summary>
    /// 排序顺序
    /// </summary>
    public int SortOrder { get; set; }
}